<html>
<?
include("../../MerchandiseBay/conn.php");


$id=$_REQUEST['d'];
$oldcategory=$_REQUEST['category'];
$oldkind=$_REQUEST['kind'];


$categorySQL="select * from category order by category";
$categoryQuery=mysql_query($categorySQL,$conn);

?>


<head>
<script language="JavaScript">
function checkData ()
      {
            if (document.edit.kind.value == "") {
                                        alert("Kind cannot be blank!.")
                                        document.edit.kind.focus()
                                        return false;}
                                     

                                      
                          
                        }
  

</script>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Title</title>
</head>

<body bgcolor="#0099FF">

<div align="center">

<table width="73%" border="0" align="left" id="table1">
	<tr>
		<td background="../mc/images/background/menuE.gif" height="34">
		<font size="4" face="Verdana">&nbsp;<font color="#FFFF00"><strong>Edit Kind - 
		<?=$oldcategory?>
		</strong></font>		</font></td>
	</tr>
	<tr>
		<td>
		<table width="100%" border="1" bordercolor="#808080" bgcolor="#EEEEEE" id="table2" style="border-collapse: collapse">
			<tr>
				<td>
				<form method="POST" name=edit action="updateKind.php" onSubmit="return checkData()" >
					<p>&nbsp;</p>
					<p><font size="2" face="Verdana">&nbsp; Category : </font>
					<font face="Verdana"> <select size="1" name="category">
					<? while($row=mysql_fetch_assoc($categoryQuery)) {
					if($oldcategory==$row['category'])
					  {?>
					<option selected><?=$row['category']?></option>
					<?}
					else {?>
					<option ><?=$row['category']?></option> ?>
					  <?}}?>
					</select></font></p>
					<p><font size="2" face="Verdana">&nbsp; Kind : </font>
					<font face="Verdana"> 
					
					<input type=hidden name=id value="<?=$id?>">
					<input type=hidden name=oldkind value="<?=$oldkind?>">
					<input type="text" name="kind" size="32" value="<?=$oldkind?>"></font></p>
					<p>&nbsp;</p>
					<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<input type="submit" value="Submit" name="B1">&nbsp;&nbsp;
					<input type="reset" value="Reset" name="B2"></p>
				</form>
&nbsp;</td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td>
		<p align="center"><a href="registerProduct.html"><font color="#FFFFFF">Register Product</font></a><font color="#FFFFFF"> |</font> <a   onclick=history.back();><font color="#FFFFFF">Back</font></a></td>
	</tr>
</table>

</div>

</body>

</html>
